/******************************************************************************
 *
 * Copyright:
 *    (C) 2000 - 2005 Embedded Artists AB
 *
 *****************************************************************************/


#include "testI2C.h"

#define MAX_LENGTH 14

/*****************************************************************************
 *
 * Description:
 *    A process entry function. 
 *
 ****************************************************************************/
tS16 testI2C(void) {
	tU8 data[3];


	//test LM75

	tS16 temp=0;
	if (1 == lm75Read(0x90, &data[0], 3))
	{
		temp = (((tS16)data[0]<<8) + (tS16)data[1]) >> 7;

		printf("\rLM75 temp = %d.%d", temp / 2, (temp&1) * 5);
	}
	else
		printf("\nFAILED to read from LM75!!!!!!!!!!!!!!!!!\n");

	return temp/2;
}

